<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width,initial-scale=1" />
        <title>添加赏析</title>
        <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
        <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.css}" crossorigin="anonymous">

        <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
        <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap-theme.css}" crossorigin="anonymous">

        <script th:src="@{/js/jquery-3.4.1.min.js}" type="text/javascript" charset="utf-8"></script>
        <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
        <script th:src="@{/bootstrap/js/bootstrap.js}" crossorigin="anonymous"></script>
        <link rel="stylesheet" th:href="@{/css/poem.css}">
    </head>
    <body>
        <!-- 导航 -->
        <nav class="navbar navbar-inverse navbar-fix-top" role="navigation">
            <div class="container" th:replace="fragments/header::header">
            </div>
        </nav>

        <div class="container">
            <div class="blog-header">
                <h1 class="blog-title">博雅古诗词</h1>
                <p class="lead blog-description">带你穿越时空，与诗仙一起吟诗作赋。</p>
            </div>
            <div class="container container-small">

                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">
                            <th:block th:text="${poetry.title}"></th:block>
                            <small>
                                [<th:block th:text="${poetry.dynasty}"></th:block>]
                                <th:block th:text="${poetry.author}"></th:block>
                            </small>
                        </h3>
                    </div>
                    <div class="panel-body" th:text="${poetry.content}">
                        Panel content
                    </div>
                </div>

                <form th:action="@{/doAppreciation}" method="post">
                    <div class="form-group">
                        <label for="content">最少12字</label>
                        <textarea class="form-control" rows="8" id="content" name="content"></textarea>
                        <input type="hidden" name="poetryid" id="poetryid" th:value="${poetry.id}">
                        <input type="hidden" name="title" id="title" th:value="${poetry.title}">
                    </div>

                    <div class="form-group">
                        <button type="submit" class="btn btn-primary btn-block">添加赏析</button>
                    </div>
                    <div class="form-group">
                        您添加的内容需要系统<kbd>审核通过</kbd>后才能显示，欢迎投稿。</a>
                    </div>
                </form>
            </div>
        </div>
        <div th:replace="fragments/footer::footer"></div>
    </body>
</html>
